<?

                           /*
$query="SELECT user_niv fROM sdusers where user_id=$_USER_ID";
$resultat=mysql_query($query);
$tmp2=mysql_fetch_row($resultat);
$user_niv=$tmp2[0];        */

$query="SELECT classe FROM urace WHERE race_id=$user_race";
$resultat=mysql_query($query);
$tmp=mysql_fetch_row($resultat);



$classex=EXPLODE("/",$tmp[0]);
FOREACH($classex as $element){ //FOREACH #02 d'autorisation  
	 if ($drap==1){ $querytmp.=" OR ";}
  	    $i=$element;
        $querytmp.="classe_id=$i";
        $drap=1;
}//	   

$query="SELECT classe_id,classe_name FROM uclasse WHERE $querytmp";
//echo $query;
//0=Race_id-1=race name-2=race sousname-3=race realname-4=race pic-5=race_pop_ini

$resultat=mysql_query($query);
$i=0;
WHILE ($tmp=mysql_fetch_array($resultat)){
$classe_id[$i]=$tmp[0];
$classe_name[$i]=$tmp[1];


$i++;
}//Fin du while.




?>



</head>


<body>
<CENTER><div align="center" CLASS="LINE1"></div></CENTER>
<table width="95%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#000000">
  <tr>
    <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" CLASS=TD2>
        <tr> 
          <td><p align="center"><strong><u><font size="6">Enregistrement de personnage.</font></u></strong></p>
            <div align="center">
              <table width="50%" border="0" cellpadding="0" cellspacing="1" bgcolor="#000000">
                <tr>
                  <td><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0" CLASS=TD1>
                      <tr> 
                        <td><div align="center"> <u><strong><font size="5">Choix 
                            de la Classe .</font></strong></u></div></td>
                      </tr>
                    </table></td>
                </tr>
              </table>
              <br>

            </div>
            <form name="form1" method="POST" action="index.php">

     
                  <?
$i=0;
 FOREACH($classe_id as $classe){
	echo "<input type=\"radio\" name=\"classe\" value=\"$classe_id[$i]\">";
	
	//$lien2="window.open('../visualisation/race.php?tmppath=../&classeid=$classe_id[$i]', 'race', 'scrollbars=yes,status=no,top=0,left=0,width=420,height=500')";

	echo "<a>$classe_name[$i]</a><BR>"; 	
 	$i++;
 }


?>
               
                <br>
              </p>
              <p> 
                
              </p>
              <p align="center">
                <?
echo"<input name=\"$SID\" type=\"hidden\" id=\"$SID\" value=\"$SID\">";
         echo"<input name=\"p\" type=\"hidden\" id=\"p\" value=\"creation_perso\">";

         $MODE="perso_class";
         SESSION_REGISTER("MODE");
         $CREATION_PERSO=0;
         SESSION_REGISTER("CREATION_PERSO");
		
?>
                <input name="mode" type="hidden" id="mode" value="classe">
                <input background : url(fond.jpg) type="submit" name="Submit" value="Suivant">
              </p>
            </form></tr>
      </table></td>
  </tr>
</table>
<CENTER><div align="center" CLASS="LINE1"></div></CENTER>
<?
IF ($erreur){
  echo"<script language=\"javascript\">
                      alert('$erreur');
                      </script>";

}
?>
